import { sendRequest } from '@/http';

const baseUrl = '/admin/institution';

/* 获取养老机构一级部门 */
export const queryInstMainDeptList = (params: any) =>
  sendRequest({
    url: `${baseUrl}/queryInstMainDeptList`,
    method: 'get',
    params,
  });

/* 获取养老机构部门 */
export const queryInstDeptList = (params: any) =>
  sendRequest({
    url: `${baseUrl}/queryInstDeptList`,
    method: 'get',
    params,
  });

/* 创建养老机构部门 */
export const createInstDept = (data: any) =>
  sendRequest({
    url: `${baseUrl}/createInstDept`,
    method: 'post',
    data,
  });

/* 编辑养老机构部门 */
export const editInstDept = (data: any) =>
  sendRequest({
    url: `${baseUrl}/editInstDept`,
    method: 'post',
    data,
  });

/* 编辑养老机构部门 */
export const deleteInstDept = (deptId: string) =>
  sendRequest({
    url: `${baseUrl}/deleteInstDept`,
    method: 'post',
    data: { deptId },
  });

/* 查询机构岗位 */
export const queryInstPosition = () =>
  sendRequest({
    url: `${baseUrl}/queryInstPosition`,
    method: 'get',
  });
